#ifndef _HASH_H_
#define _HASH_H_

#include <iostream>
#include <stdio.h>

using namespace std;

typedef struct HASH	hash_t;

struct HASH
{
    void 	*key;
    int		len;
    void	*value;
    hash_t 	*next;
};

class hash
{
  public:
    hash(int size);
    ~hash();

  public:
    bool init_hash();
    bool add_hash(hash_t *node);
    bool del_hash(hash_t *node);
    bool get_hash(hash_t *node);
    bool watch_hash();

  private:
    int hasher(void *str);
    
  private:
    hash_t	**m_hash;
    int		m_size;
};

#endif

